package com.xyz.dao.logic;

import com.free.ext.mybatis.model.entity.PageResponseModel;
import com.xyz.dao.dao.CCustomerviplogDao;
import com.xyz.domain.table.CCustomerviplog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class CCustomerviplogLogic {

    @Autowired
    private CCustomerviplogDao cCustomerviplogDao;

    public CCustomerviplog add(CCustomerviplog cCustomerviplog){
        return cCustomerviplogDao.insert(cCustomerviplog);
    }

    public Integer update(CCustomerviplog cCustomerviplog){
        return cCustomerviplogDao.update(cCustomerviplog);
    }

    public List<CCustomerviplog> list(CCustomerviplog cCustomerviplog, String orderBy){
        return cCustomerviplogDao.selectList(cCustomerviplog, orderBy);
    }

    public Integer delete(Integer key){
        return cCustomerviplogDao.delete(key);
    }

    public PageResponseModel<CCustomerviplog> pageInfo(CCustomerviplog cCustomerviplog, String orderBy, Integer pageNo, Integer pageSize){
        return cCustomerviplogDao.selectByPageNo(cCustomerviplog, orderBy, pageNo, pageSize);
    }

    public List<CCustomerviplog> selectValidVipInfo(CCustomerviplog condition){
        return cCustomerviplogDao.selectValidVipInfo(condition);
    }

}